<?php
/**
 * Created by PhpStorm.
 * User: 10037
 * Date: 2022/6/13
 * Time: 17:38
 */

namespace app\admin\model;


use think\Model;

class Backlinks extends Model
{
    protected $pk='id';

    public function addLinks($linkName,$linkUrl,$linkImg){
        $data['backlinksName']=$linkName;
        $data['backlinks']=$linkUrl;
        $data['linksImg']=$linkImg;

        return $this->save($data);
    }

    public function selectLinkAll(){
        return $this->where('delete','=',0)->select();
    }

    public function deleteLink($id){
        $result=$this->find($id);
        $result['delete']=1;
        return $result->save();
    }
}